<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var week = -8;
        //将周一到周末之外的都给排除掉
        if (week > 7 || week < 1) {
            console.log("没有这一天");
        } else {
            /* 属于周一到周末之内的时间 */
            switch (week) {
                case 1:
                    console.log("周一   =>      钓鱼");
                    break;
                case 2:
                    console.log("周二   =>      钓凯子");
                    break;
                case 3:
                    console.log("周三   =>      钓妹子");
                    break;
                case 4:
                    console.log("周四   =>      看代码");
                    break;
                case 5:
                    console.log("周五   =>      敲代码");
                    break;
                default:
                    console.log("周末   =>      睡觉!");
            }
        }
    </script>
</body>

</html>